package cheme.ProcessEditor.Tools;

import org.eclipse.gef.palette.ToolEntry;
import org.eclipse.gef.requests.CreationFactory;

import cheme.ProcessEditor.ChemeConstants;
import cheme.ProcessModel.ProcessModelConstants;


public class CreateGroupToolEntry extends ToolEntry
{
	/**
	 * Creates a new MarqueeToolEntry that can select nodes
	 */
	public CreateGroupToolEntry(CreationFactory factory)
	{
		this(null, null, factory);
	}

	/**
	 * Constructor for MarqueeToolEntry.
	 * 
	 * @param label the label; can be <code>null</code>
	 * @param description the description (can be <code>null</code>)
	 */
	public CreateGroupToolEntry(String label, String description, CreationFactory factory)
	{		
		super(label, description, ChemeConstants.DESC_SUBPROCESS, ChemeConstants.DESC_SUBPROCESS, CreateGroupTool.class);
		
		if(description == null || description.length() == 0)
		{
			setLabel(ProcessModelConstants.CREATE_GROUP_TOOL_LABEL);
		}
		
		if(label == null || label.length() == 0)
		{
			setDescription(ProcessModelConstants.CREATE_GROUP_TOOL_DESC);
		}
				
		setToolProperty(CreateGroupTool.PROPERTY_CREATION_FACTORY, factory);
		
		setUserModificationPermission(PERMISSION_NO_MODIFICATION);
	}
}